
<template>
    <Button  type="text"  size="small" v-permission="'btnModify'"  icon="edit" @click="clickHandler" :disabled="creator !== userName" ></Button>
</template>

<script>
  export default {
    accessLabel: '修改行',
    accessKey: 'btnModify',
    props:{
      creator:String,
      required:true
    },
    data() {
      return {
        userName:''
      }
    },
    methods: {
      clickHandler () {
        this.$emit('modifyClick');
      }
    },
    mounted () {
      this.userName = this.$auth.user().name
    }
  };
</script>
